package com.peak.distribution.entity.admin;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

import com.peak.distribution.enums.Constants;
import com.peak.distribution.enums.RoleType;
import com.peak.spring.boot.api.entity.DefaultStategyEntity;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 角色表
 * @author Haley Gao
 *
 */
@Entity
@Table(name = "dis_role")
@Data
@EqualsAndHashCode(callSuper=true)
public class DisRole extends DefaultStategyEntity {
	
	private static final long serialVersionUID = Constants.DISTRIBUTION_VERSION;
	
	/** 角色类型：管理员，代理 */
	private RoleType type;

	/** 角色名，要求英文大写，唯一值 */
	private String name;
	
	/** 角色中文名 */
	private String description;
	
	/** 登录成功跳转的链接 */
	private String successUrl;

	@Enumerated(EnumType.STRING)
	public RoleType getType() {
		return type;
	}
}
